<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('电话工单初稿编辑')"/>
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">
    <link th:href="@{/css/iconfont/iconfont.css}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" th:href="@{/ajax/libs/qxEasyUI/themes/default/easyui.css}">
</head>
<style>
    .bootstrap-tagsinput > input {
        display: none;
    }
</style>

<body style="background-color: #F4F6FA">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" th:object="${workFormBase}" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" name="fromTelA" th:field="*{fromTelA}">
        <div class="col-sm-12" style="display: flex">
            <!--     左       -->
            <div class="col-sm-6 entering-page">
                <!--   来电基本信息     -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">来电基本信息</h4>
                </div>
                <!--事发地址-->
                <div class="col-sm-12 entering-mt">
                    <div class="form-group">
                        <label class="col-sm-2 control-label is-required entering-pd">事发地址：</label>
                        <div class="col-sm-8">
                            <input id="fmAddress" name="fmAddress" th:field="*{fmAddress}" placeholder="请输入"
                                   class="form-control scene theAddress" type="text"
                                   maxlength="30"
                                   required="" disabled>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-sm btn-primary"
                                    style="margin-top: 3px;color: #206ef7;background-color: white"
                                    onclick="sensitivity()">敏感信息
                            </button>
                        </div>
                    </div>
                </div>
                <!-- 来电类型,内容类别..-->
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label  entering-pd">来电类型：</label>
                        <div class="col-sm-8">
                            <select name="dfmClaNo" id="phoneCategory" style="width:160px;height:30px;border: 1px solid #e5e6e7">
                                <option value="">-请选择-</option>
                                <option value="1">投诉</option>
                                <option value="2">建议</option>
                                <option value="3" selected>表扬</option>
                            </select>
                            <input type="hidden" name="dfmClaName" id="dFmClaName"/>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">内容类别：</label>
                        <div class="col-sm-8">
                            <input id="qxCT" th:field="*{dcntAname}" style="width:180px;height:31px;">
                            <input id="txtDcntAcode" name="dcntAcode" type="hidden" value=""/>
                            <input id="txtDCntAName" name="dcntAname" type="hidden" value=""/>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">流水号：</label>
                        <div class="col-sm-8">
                            <input id="wsCode" name="wsCode" th:field="*{wsCode}" placeholder="请输入"
                                   class="form-control serial"
                                   type="text"
                                   maxlength="11" required="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">提取码：</label>
                        <div class="col-sm-8">
                            <input id="wsKey" name="wsKey" th:field="*{wsKey}" placeholder="请输入"
                                   class="form-control code"
                                   type="text"
                                   maxlength="11" required="" disabled>
                        </div>
                    </div>
                </div>
                <!--来电类容-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label entering-pd">来电内容：</label>
                        <div class="col-xs-10">
                            <!-- 标签-->
                            <div class="col-sm-12">
                                <div style="float: right;"> 关键词标签
                                    <input class="phoneRemarkTog" name="keyWord" th:field="*{keyWord}" type="text" value="jQuery,Script,Net"
                                           data-role="tagsinput" disabled>
                                </div>
                            </div>
                            <textarea id="fmContent" name="fmContent" th:field="*{fmContent}" maxlength="1000"
                                      class="form-control phoneRemark" rows="3"
                                      style="height: 100px" disabled></textarea>

                            <span>还可以输入<i class="phoneRemarkI">1000</i>个文字</span>

                        </div>
                    </div>
                </div>
                <!--备注坐席-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label entering-pd">备注坐席：</label>
                        <div class="col-xs-10">
                            <!-- 标签-->
                            <div class="col-sm-12">
                                <div style="float: right;">
                                    <div style="display: inline-block">被诉主体：</div>
                                    <input id="accSubject" class="SeatsRemarkTog" name="accSubject"
                                           th:field="*{accSubject}" type="text"
                                           value="jQuery,Script,Net"
                                           data-role="tagsinput" disabled>
                                </div>

                            </div>
                            <select id="xSysDescSelect" onchange="dropChgSendTextOnly(this,'xsysDesc');"
                                    th:with="district=${@commonServiceImpl.findSeatsRemark()}"
                                    class="form-control formSelect">
                                <option value="">--请选择--</option>
                                <option th:each="item : ${district}" th:text="${item['CSText']}"
                                        th:value="${item['CSValue']}"></option>
                            </select>
                            <textarea name="xsysDesc" th:field="*{xsysDesc}" id="xsysDesc" maxlength="3500"
                                      class="form-control SeatsRemark"
                                      rows="3"></textarea>
                            <span>还可以输入<i class="SeatsRemarkI">3500</i>个文字</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">屏蔽号码：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
<!--                                th:field="*{hideTel}"-->
                                <input name="hideTel"  value="5" type="radio" disabled="disabled">是
                            </label>
                            <label class="check-box">
                                <input name="hideTel"  value="0" type="radio" checked
                                       disabled="disabled">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">同意公开：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
<!--                                th:field="*{openFrom}"-->
                                <input name="openFrom"  value="1" type="radio"
                                       disabled="disabled">是
                            </label>
                            <label class="check-box">
                                <input name="openFrom" value="0" type="radio" checked disabled="disabled">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">重复来电：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
<!--                                th:field="*{repeatFlag}"-->
                                <input name="repeatFlag"  value="1" type="radio"
                                       disabled="disabled">是
                            </label>
                            <label class="check-box">
                                <input name="repeatFlag" value="0" type="radio" checked disabled="disabled">否
                            </label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">紧急联系：</label>
                        <div class="col-xs-8">
                            <label class="check-box">
<!--                                th:field="*{mark}"-->
                                <input name="mark"  value="1" type="radio" disabled="disabled">是
                            </label>
                            <label class="check-box">
                                <input name="mark" value="0" type="radio" checked disabled="disabled">否
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <!--     右       -->
            <div class="col-sm-6 entering-page">
                <div class="col-sm-12">
                    <!--   工单基本信息     -->
                    <div class="col-sm-12 tltieBoder">
                        <div class="blueBorder"></div>
                        <h4 style="margin:0 0 0 10px">工单基本信息</h4>
                    </div>
                    <!--工单主题,工单编号,工单性质...-->
                    <div class="col-sm-12">
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">工单主题：</label>
                            <div class="col-sm-8">
                                <input name="wsTopic" th:field="*{wsTopic}" placeholder="请输入" class="form-control workTheme" type="text"
                                       required="">
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">工单编号：</label>
                            <div class="col-sm-8">
                                <input name="workFormNo" th:field="*{workFormNo}" placeholder="请输入" class="form-control workNumber" type="text"
                                       required="">
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label entering-pd">工单性质：</label>
                            <div class="col-sm-8">
<!--                                <input name="setProId" th:field="*{setProId}"   placeholder="请输入" class="form-control workCharacter"-->
<!--                                       type="text"-->
<!--                                       required="">-->
                                <select name="setProId" id="setProId" onchange="getSetProName()"
                                        th:with="district=${@commonServiceImpl.findWorkFormType()}"
                                        class="form-control formSelect">
                                    <option value="">--请选择--</option>
                                    <option th:each="item : ${district}" th:text="${item['CSText']}"
                                            th:value="${item['CSValue']}" th:selected="${item['CSValue']} == *{setProId}"></option>
                                </select>
                                <input id="setProName" type="hidden" name="setProName"/>
                            </div>
                        </div>
                        <div class="form-group col-sm-6">
                            <label class="col-sm-4 control-label is-required entering-pd">拟办期限：</label>
                            <div class="col-sm-8">
                                <input name="wfLimit" th:field="*{wfLimit}" placeholder="请输入" class="form-control deadline" type="text"
                                       required="">
                            </div>
                            <div class="input-group-append " style="position: absolute;top: 10px;right: 40px;">
                                <span class="glyphicon glyphicon-calendar "></span>
                            </div>
                        </div>
                    </div>
                    <!-- 工单备注-->
                    <div class="col-sm-12" style="margin: 8px 0 8px 0;">
                        <div class="form-group">
                            <label class="col-xs-2 control-label entering-pd">工单备注：</label>

                            <div class="col-xs-10">
                                <!--呈批-->
                                <div class="col-sm-12">
                                    <div style="float: right;"><span class="glyphicon glyphicon-cloud-upload"
                                                                     style="color: #206EF7"></span><a>呈批</a></div>
                                </div>
                                <textarea name="wfRemark" th:field="*{wfRemark}" maxlength="3500" class="form-control workRemark"
                                          rows="3" style="height: 100px"></textarea>
                                <span>还可以输入<i class="workRemarkI">3500</i>个文字</span>
                            </div>
                        </div>
                    </div>
                    <!-- 单选-->
                    <div class="col-sm-12">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-xs-4 control-label">建议公开：</label>
                                <div class="col-xs-8">
                                    <label class="check-box">
                                        <input name="openX" value="1" type="radio" th:checked="*{openX} == 1">是
                                    </label>
                                    <label class="check-box">
                                        <input name="openX" value="0" type="radio" th:checked="*{openX} == 0">否
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-xs-4 control-label is-required">是否督办：</label>
                                <div class="col-xs-8">
                                    <label class="check-box">
                                        <input name="supervision" value="1" type="radio" th:checked="*{reportFlag} == 21" onclick="">是
                                    </label>
                                    <label class="check-box">
                                        <input name="supervision" value="0" type="radio" th:checked="*{setProId} != 21">否
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-xs-4 control-label">重点项目：</label>
                                <div class="col-xs-8">
                                    <label class="check-box">
                                        <input name="emphasisProject" value="1" type="radio">是
                                    </label>
                                    <label class="check-box">
                                        <input name="emphasisProject" value="0" type="radio" checked>否
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label class="col-xs-4 control-label">摘报：</label>
                                <div class="col-xs-8">
                                    <label class="check-box">
                                        <input name="reportFlag" value="1" type="radio" th:checked="*{reportFlag} == 1">是
                                    </label>
                                    <label class="check-box">
                                        <input name="reportFlag" value="0" type="radio" th:checked="*{reportFlag} == 0">否
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--   工单基本信息     -->
                    <div class="col-sm-12 tltieBoder">
                        <div class="blueBorder"></div>
                        <h4 style="margin:0 0 0 10px">拟办部门</h4>
                    </div>
                    <div class="col-sm-12">
                        <div class="btn-group-sm" id="toolbar" role="group">
                            <a class="btn btn-success" onclick="proposed()">
                                <i class="fa fa-plus"></i> 新增
                            </a>
                        </div>
                        <table id="table" style="table-layout: fixed"></table>
                    </div>
                    <input th:field="*{pkId}" type="hidden" name="pkId"/>
                </div>
            </div>

        </div>
        <!--按钮-->
        <div class="col-sm-12 entering-bt" style="justify-content: center;">
            <button type="button" class="btn btn-sm btn-info" onclick="dispatch()">通过并派单
            </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--            <button type="button" class="btn btn-sm btn-success" onclick="invalidPhone()">直接答复-->
<!--            </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
            <button type="button" class="btn btn-sm btn-warning" onclick="$.modal.closeTab()">关闭
            </button>&nbsp;
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/ajax/libs/qxEasyUI/jquery.easyui.min.js}"></script>
<script th:src="@{/js/teladd.js}"></script>
<th:block th:include="include :: bootstrap-table-fixed-columns-js" />
<script th:src="@{/js/tworkformadd.js}"></script>

<script>
    var prefix = ctx + "system/workForm";
    function dispatch() {
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(prefix + "/update", data);
        }
    }
    $('#qxCT').combotree({
        url: '/system/common/findContentCate',
        required: false,
        onSelect:function(record){
            $("#txtDcntAcode").val(record.id);
            $("#txtDCntAName").val(record.text);
        }
    });
    function proposed() {
        var url =prefix +"/proposed";
        $.modal.open('拟办部门',url);
    }

    var wfSendBack = new Object();
    function work(data) {
        wfSendBack= data;
    }


    function getSetProName(){
        var proName = $("#setProId").find("option:selected").text();
        if (proName === '-请选择-') {
            $("#setProName").val("");
        }else {
            $("#setProName").val(proName);
        }
    }
</script>
</body>
</html>

